package com.cndatacom.teleweb.service.impl;

import com.cndatacom.teleweb.common.PaginationModel;
import com.cndatacom.teleweb.dao.IQuestionAnswerDao;
import com.cndatacom.teleweb.model.QuestionAnswer;
import com.cndatacom.teleweb.service.IQuestionAnswerService;

public class QuestionAnswerService implements IQuestionAnswerService {

	private IQuestionAnswerDao questionAnswerDao;
	
	public IQuestionAnswerDao getQuestionAnswerDao() {
		return questionAnswerDao;
	}

	public void setQuestionAnswerDao(IQuestionAnswerDao questionAnswerDao) {
		this.questionAnswerDao = questionAnswerDao;
	}

	public QuestionAnswer addQuestionAnswer(QuestionAnswer questionAnswer) {
		return questionAnswerDao.addQuestionAnswer(questionAnswer);
	}

	public boolean delQuestionAnswer(QuestionAnswer questionAnswer) {
		return questionAnswerDao.delQuestionAnswer(questionAnswer);
	}

	public PaginationModel getAllQuestionAnswer(int offset, int pageSize) {
		return questionAnswerDao.getAllQuestionAnswer(offset, pageSize);
	}

	public QuestionAnswer getQuestionAnswerById(int questionId) {
		return questionAnswerDao.getQuestionAnswerById(questionId);
	}

	public QuestionAnswer updateQuestionAnswer(QuestionAnswer questionAnswer) {
		return questionAnswerDao.updateQuestionAnswer(questionAnswer);
	}

	public PaginationModel getPendingQuestionAnswer(int offset, int pageSize) {
		return questionAnswerDao.getPendingQuestionAnswer(offset, pageSize);
	}

	public PaginationModel getPublishQuestionAnswer(int offset, int pageSize) {
		return questionAnswerDao.getPublishQuestionAnswer(offset, pageSize);
	}

}
